﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Short-Urls.aspx.cs" Inherits="TSB.SharePointUrlShortener.Layouts.TSB.SharePointUrlShortener.Short_Urls" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <link rel="stylesheet" type="text/css" href="/_layouts/TSB.SharePointUrlShortener/shorturl.css" />
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<h1>Managing Short Urls</h1>
<p>These are the Short Urls currently configured and available on this site:</p>

<asp:Literal ID="ltErrors" runat="server"></asp:Literal>
<asp:Repeater ID="rptShortUrls" runat="server">
<HeaderTemplate>
    <table class="shorturl" cellspacing="0" cellpadding="0">
        <tr>
            <th>&nbsp;</th>
			<th>&nbsp;</th>
            <th>Short Url</th>
            <th>Full Url</th>
        </tr>
</HeaderTemplate>
<ItemTemplate>
        <tr class="alt">
            <td class="icon"><asp:HyperLink ID="lnkGo" CssClass="go" runat="server" Text="Go" ToolTip="Follow Url" /></td>
            <td class="icon"><asp:HyperLink ID="lnkDelete" CssClass="delete" runat="server" Text="Delete" ToolTip="Click to Delete this short code" /></td>
            <td><asp:Literal ID="ltShortCode" runat="server" /></td>
            <td><asp:Literal ID="ltUrl" runat="server" /></td>
        </tr>
</ItemTemplate>
<AlternatingItemTemplate>
        <tr>
            <td class="icon"><asp:HyperLink ID="lnkGo" CssClass="go" runat="server" Text="Go" ToolTip="Follow Url" /></td>
            <td class="icon"><asp:HyperLink ID="lnkDelete" CssClass="delete" runat="server" Text="Delete" ToolTip="Click to Delete this short code" /></td>
            <td><asp:Literal ID="ltShortCode" runat="server" /></td>
            <td><asp:Literal ID="ltUrl" runat="server" /></td>
        </tr>
</AlternatingItemTemplate>
<FooterTemplate>
    </table>
</FooterTemplate>
</asp:Repeater>

<div class="tsbpanel">
    <h2>Add external link</h2>
    <p>You can add external links for short codes</p>
    <ul class="shortener">
        <li><asp:Label runat="server" Text="Short Url" AssociatedControlID="txtShortcode" /> <asp:TextBox runat="server" ID="txtShortcode" MaxLength="20" /></li>
        <li><asp:Label runat="server" Text="Full Url" AssociatedControlID="txtUrl" /> <asp:TextBox ID="txtUrl" runat="server" /></li>   
        <li><asp:Button ID="btnCreate" runat="server" Text="Create" /></li>         
    </ul>
</div>
<div class="footer">
<p>Version 0.1 Beta - <a href="http://www.thesharepointbaker.co.uk" target="_blank">http://www.thesharepointbaker.co.uk</a></p>
</div>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Managed Short Urls
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Managed Short Urls
</asp:Content>
